package xin.yangshuai.activemqproducertopic.config;

import org.apache.activemq.command.ActiveMQTopic;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.jms.Topic;


/**
 * ConfigBean
 *
 * @author shuai
 * @date 2020/6/25
 */
@Configuration
public class ConfigBean {

    @Value("${mytopic}")
    public String myTopic;

    @Bean
    public Topic topic() {
        return new ActiveMQTopic(myTopic);
    }

}
